
#include "Util/CsvUtil.h"
#include "Util/FillUtil.h"
#include "Database/TransactionalDatabase.h"
#include "ui.h"

int main() {
    UI instance;
    int op;
    while ((op = instance.menu()) != 0) {
        switch (op) {
            case 1:
                instance.openDatabase();
                break;
            case 2:
                instance.importCsv();
                break;
            case 3:
                instance.insert();
                break;
            case 4:
                instance.update();
                break;
            case 5:
                instance.remove();
                break;
            case 6:
                instance.select();
                break;
            case 7:
                instance.selectAll();
                break;
            case 8:
                instance.legacyQuery();
                break;
            case 9:
                instance.query();
                break;
            case 10:
                instance.listTransaction();
                break;
            case 11:
                instance.rollback();
                break;
            case 12:
                instance.clear();
                break;
            case 13:
                instance.closeDatabase();
                break;
            case 14:
                instance.deleteDatabase();
                break;
            default:
                cout << "Wrong option!" << endl;
        }
   }
    return 0;
}